<template>
  <div class="ranking">
    <div class="ranking-header">
      <h4>热门</h4>
      <div>
        <span>三日</span>
        <i></i>
        <ul>
          <li>三日</li>
          <li>一周</li>
        </ul>
      </div>
    </div>
    <ul class="ranking-content">
      <li v-for="index in 3" :key="index">
        <i>{{index}}</i>
        <a>
          <div>
            <img src="../../static/images/jingxuan2.webp" alt="">
            <div>
              <p class="p-l">法核算方法佛尔哈佛安抚好伐</p>
              <p class="p-r">综合评分：250万</p>
            </div>
          </div>
        </a>
      </li>
      <li v-for="index in liNum" :key="index+3" class="ranking-content-bottom">
        <i>{{index+3}}</i>
        <a>
          <div>
            <p>【4月】机动奥特曼 第二季 01</p>
            <p>综合评分：45.1万</p>
          </div>
        </a>
      </li>
    </ul>
    <a>查看更多
      <i></i>
    </a>
  </div>
</template>

<script>
export default {
  name:'categoryRight',
  props:{
    liNum:Number
  }
}
</script>

<style lang="less" scoped>
.ranking{
  float: right;
  width: 260px;
  height: 534px;
}
.ranking-header{
  height: 24px;
  line-height: 24px;
  h4{
    margin: 0;
    padding: 0;
    float: left;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
  }
  div{
    float: right;
    position: relative;
    vertical-align: middle;
    background-color: #fff;
    font-size: 12px;
    cursor: default;
    padding: 0 7px;
    height: 22px;
    line-height: 22px;
    border: 1px solid #ccd0d7;
    border-radius: 4px;
    i{
      background-image: url(../../static/images/icons.png);
      background-position: -475px -157px;
      display: inline-block;
      vertical-align: middle;
      width: 12px;
      height: 6px;
      margin-left: 5px;
      margin-top: -1px;
    }
    ul{
      position: absolute;
      width: 100%;
      background: #fff;
      border: 1px solid #ccd0d7;
      border-top: 0;
      left: -1px;
      top: 22px;
      z-index: 10;
      display: none;
      border-radius: 0 0 4px 4px;
      li{
        cursor: pointer;
        margin: 0;
        padding: 3px 7px;
      }
    }
  }
}
.ranking-content{
  padding-bottom: 15px;
  min-height: 278px;
  width: 100%;
  padding-top: 20px;
  position: relative;
  li{
    margin-top: 0;
    margin-bottom: 15px;
    position: relative;
    width: 235px;
    height: 51px;
    &:hover .p-l{
      color: #00a1d6;
    }
    i{
      float: left;
      position: absolute;
      color: #fff;
      width: 12px;
      height: 18px;
      line-height: 18px;
      top: 0;
      left: 0;
      font-size: 12px;
      min-width: 12px;
      text-align: center;
      background-color: #00a1d6;
      border-radius: 4px;
      padding: 0 3px;
      font-weight: bolder;
      font-style: normal;
    }
    a{
      display: block;
      float: left;
      position: absolute;
      left: 25px;
      div{
        display: flex;
        img{
          border-radius: 4px;
          width: 80px;
          height: 50px;
        }
        div{
          margin-left: 10px;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          .p-l{
            height: 36px;
            line-height: 18px;
            margin-top: -2px;
            width: 150px;
            padding: 0;
            font-size: 12px;
            overflow: hidden;
            color: #222;
          }
          .p-r{
            line-height: 12px;
            color: #99a2aa;
            height: 12px;
            margin-top: 5px;
            font-size: 12px;
          }
        }
      }
    }
  }
}
.ranking-content .ranking-content-bottom{
  position: relative;
  padding-left: 25px;
  margin-top: 20px;
  margin-bottom: 0;
  overflow: hidden;
  width: 235px;
  height: 18px;
  &:hover p:first-child{
    color: #00a1d6;
  }
  i{
    position: absolute;
    color: #fff;
    height: 18px;
    line-height: 18px;
    top: 0;
    left: 0;
    font-size: 12px;
    min-width: 12px;
    text-align: center;
    background-color: #b8c0cc;
    border-radius: 4px;
    padding: 0 3px;
    font-weight: bolder;
    font-style: normal;
  }
  a{
    position: absolute;
    display: block;
    cursor: pointer;
    left: 25px;
    div{
      float: left;
      p{
        font-size: 12px;
        &:first-child{
          line-height: 18px;
          height: 18px;
          overflow: hidden;
          color: #222;
        }
        &:last-child{
          line-height: 12px;
          color: #99a2aa;
          height: 12px;
          margin-top: 5px;
          overflow: hidden;
          display: none;
        }
      }
    }
  }
}
.ranking>a{
  display: block;
  height: 24px;
  line-height: 24px;
  background-color: #e5e9ef;
  text-align: center;
  border: 1px solid #e0e6ed;
  color: #222;
  border-radius: 4px;
  transition: .2s;
  font-size: 12px;
  & i{
    background-image: url(../../static/images/icons.png);
    display: inline-block;
    vertical-align: middle;
    background-position: -478px -218px;
    width: 6px;
    height: 12px;
    margin: -2px 0 0 5px;
  }
}

</style>